home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacWorld 1998 September
/
Macworld (1998-09).dmg
/
Shareware World
/
Info
/
For Developers
/
MacZoop 1.8.3
/
Required Classes
/
Z Headers
/
ZObjectArray.h
< prev
next >
Wrap
Text File
|
1998-06-11
|
1KB
|
68 lines
/*************************************************************************************************
*
*
* MacZoop - "the framework for the rest of us"
*
*
*
* ZObjectArray.h -- the basic container class object
*
*
*
*
*
* © 1996, Graham Cox
*
*
*
*
*************************************************************************************************/
#pragma once
#ifndef __ZOBJECTARRAY__
#define __ZOBJECTARRAY__
#ifndef __ZARRAY__
#include "ZArray.h"
#endif
DEFINECLASSID( ZObjectArray, 'zoba' );
template <class T> class ZObjectArray : public ZArray
{
protected:
T*** o;
public:
ZObjectArray();
virtual T* GetObject( const long index );
virtual void SetArrayItem(void* item, const long index);
virtual void GetArrayItem(void* item, const long index);
virtual void ConcatenateArray( ZObjectArray<T>* anArray );
virtual long FindIndex(T* item);
virtual void Swap( const long itema, const long itemb );
virtual void DeleteObject(T* item);
virtual void DisposeAll();
virtual Boolean Contains(T* item);
virtual void DoForEach( IteratorProcPtr aProc, const long ref );
virtual void MoveItem( const long curIndex, const long newIndex );
virtual void MoveToFront( const long index );
virtual void MoveToBack( const long index );
// streaming:
virtual void WriteToStream( ZStream* aStream );
virtual void ReadFromStream( ZStream* aStream );
};
typedef ZObjectArray<ZObject> ZObjectList;
DEFINECLASSID( ZObjectList, 'zoba' );
#endif